package bishi.dada;

import java.util.Scanner;

/**
 * @author: 唐小尊
 * @email: 1171702529@qq.com
 * @cate: 2021/09/05 16:27
 */

/**
 * 兔子不死
 * 出生3个月，一对就可以生一对。
 * 第一个月，第一对，兔子出生
 */
public class one {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int one = 2;
        int two = 0;
        int three = 0;
        while (n>0){
            int newA = three;
            three +=two;
            two = one;
            one = newA;
            n--;
        }
        System.out.println(one+two+three);
    }
}
